﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ClassLibraryEntidades;

namespace SerializaRutasSimuladas
{
    public partial class FormEliminarRutas : Form
    {
        public Dictionary<string, Ruta> dictionaryBusquedas;

        public FormEliminarRutas()
        {
            InitializeComponent();
        }

        private void FormEliminarRutas_Load(object sender, EventArgs e)
        {
            foreach(string ruta in dictionaryBusquedas.Keys)
            {
                this.checkedListBox_rutas.Items.Add(ruta);
            }
            this.checkedListBox_rutas.GetSelected(0);
           
        }

        private void button_EliminarRuta_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < this.checkedListBox_rutas.Items.Count; i++)
			{

                if (this.checkedListBox_rutas.GetItemChecked(i))
                    dictionaryBusquedas.Remove((string)this.checkedListBox_rutas.Items[i]);
			}
            
        }

       

        
    }
}
